package com.tianheng.wanzhou.datacollecting.db.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author yjw
 * @since 2020-07-20
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Warning extends Model<Warning> {

    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @TableId("machine_id")
    private String machineId;

    /**
     * 字段名
     */
    @TableField("column_name")
    private String columnName;

    /**
     * 警戒值类型. 0--最大值, 1--最小值
     */
    @TableField("warning_type")
    private Integer warningType;

    /**
     * 警戒值
     */
    @TableField("warning_value")
    private Float warningValue;


    @Override
    protected Serializable pkVal() {
        return this.machineId;
    }

}
